
package me.zhengjie.modules.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import java.sql.Timestamp;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import me.zhengjie.base.BaseEntity;

import javax.validation.constraints.NotNull;

/**
* @description /
* @author pysduck
* @date 2024-07-08
**/
@Data
@TableName("tool_flow_config")
public class FlowConfig extends BaseEntity implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "唯一主键")
    private Integer id;

    @NotNull
    @ApiModelProperty(value = "流程名")
    private String flowName;

    @ApiModelProperty(value = "流程ID")
    private String flowId;

    @ApiModelProperty(value = "流程键")
    private String flowKey;

    @ApiModelProperty(value = "原始数据")
    private String orginalData;

    @ApiModelProperty(value = "流程类型ID")
    private Integer flowTypeId;

    @ApiModelProperty(value = "流程类型")
    @TableField(exist = false )
    private FlowType flowTypes;

    @ApiModelProperty(value = "是否已部署")
    private String isDeployed;

    @ApiModelProperty(value = "图标")
    private String icon;

    @ApiModelProperty(value = "备注")
    private String remarks;

    @ApiModelProperty(value = "状态")
    private Integer status;

    public void copy(FlowConfig source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}
